<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="adspygoogle-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/google-api-dfp-python">DFP API Python Client Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="adspygoogle-module.html">Package&nbsp;adspygoogle</a> ::
        <a href="adspygoogle.common-module.html">Package&nbsp;common</a> ::
        <a href="adspygoogle.common.zsi-module.html">Package&nbsp;zsi</a> ::
        <a href="adspygoogle.common.zsi.HttpsConnectionHandler-module.html">Module&nbsp;HttpsConnectionHandler</a> ::
        Class&nbsp;HttpsConnectionHandler
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HttpsConnectionHandler</h1><p class="nomargin-top"><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler">source&nbsp;code</a></span></p>
<pre class="base-tree">
httplib.HTTPConnection --+    
                         |    
   httplib.HTTPSConnection --+
                             |
                            <strong class="uidshort">HttpsConnectionHandler</strong>
</pre>

<hr />
<p>Implements HttpsConnectionHandler.</p>
  <p>Responsible for creating custom HTTPS connection object to intercept 
  ZSI's implementation. Provides support for sending and recieving 
  compressed data.</p>
  <p>Overwrites httplib's send(), putrequest(), putheader(), endheaders(), 
  and getresponse().</p>

<!-- ==================== NESTED CLASSES ==================== -->
<a name="section-NestedClasses"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Nested Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-NestedClasses"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPConnection</code></b>:
      <code><a href="httplib.HTTPResponse-class.html">response_class</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">host</span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">strict</span>=<span class="summary-sig-default">None</span>)</span><br />
      Inits HttpsConnectionHandler with host and port.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html#send" class="summary-sig-name">send</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span><br />
      Send data to the server.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.send">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html#putrequest" class="summary-sig-name">putrequest</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">method</span>,
        <span class="summary-sig-arg">url</span>,
        <span class="summary-sig-arg">skip_host</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">skip_accept_encoding</span>=<span class="summary-sig-default">False</span>)</span><br />
      Send a request to the server.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.putrequest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html#putheader" class="summary-sig-name">putheader</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">header</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      Send a request header line to the server.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.putheader">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html#endheaders" class="summary-sig-name">endheaders</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Indicate that the last header line has been sent to the server.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.endheaders">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="adspygoogle.common.zsi.HttpsConnectionHandler.HttpsConnectionHandler-class.html#getresponse" class="summary-sig-name">getresponse</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Get the response from the server.&quot;</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.getresponse">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPSConnection</code></b>:
      <code>connect</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPConnection</code></b>:
      <code>close</code>,
      <code>request</code>,
      <code>set_debuglevel</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPConnection</code></b> (private):
      <code>_output</code>,
      <code>_send_output</code>,
      <code>_send_request</code>,
      <code>_set_hostport</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_CS_IDLE"></a><span class="summary-name">_CS_IDLE</span> = <code title="'Idle'"><code class="variable-quote">'</code><code class="variable-string">Idle</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_CS_REQ_STARTED"></a><span class="summary-name">_CS_REQ_STARTED</span> = <code title="'Request-started'"><code class="variable-quote">'</code><code class="variable-string">Request-started</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_CS_REQ_SENT"></a><span class="summary-name">_CS_REQ_SENT</span> = <code title="'Request-sent'"><code class="variable-quote">'</code><code class="variable-string">Request-sent</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_UNKNOWN"></a><span class="summary-name">_UNKNOWN</span> = <code title="'UNKNOWN'"><code class="variable-quote">'</code><code class="variable-string">UNKNOWN</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="debug"></a><span class="summary-name">debug</span> = <code title="False">False</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="compress"></a><span class="summary-name">compress</span> = <code title="False">False</code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPSConnection</code></b>:
      <code>default_port</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPConnection</code></b>:
      <code>auto_open</code>,
      <code>debuglevel</code>,
      <code>strict</code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code>httplib.HTTPConnection</code></b> (private):
      <code>_http_vsn</code>,
      <code>_http_vsn_str</code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">host</span>,
        <span class="sig-arg">port</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">strict</span>=<span class="sig-default">None</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Inits HttpsConnectionHandler with host and port.

Args:
  host: str HTTPS host or combined form of host:port.
  [optional]
  port: int HTTPS port number.
  strict: bool if True, causes BadStatusLine to be raised if the status
          line can't be parsed as a valid HTTP/1.0 or 1.1 status line.

</pre>
  <dl class="fields">
    <dt>Overrides:
        httplib.HTTPConnection.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="send"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">send</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.send">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Send data to the server.

Args:
  data: str Data to send to the server.

</pre>
  <dl class="fields">
    <dt>Overrides:
        httplib.HTTPConnection.send
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="putrequest"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">putrequest</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">method</span>,
        <span class="sig-arg">url</span>,
        <span class="sig-arg">skip_host</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">skip_accept_encoding</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.putrequest">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Send a request to the server.

Args:
  method: str Specifies an HTTP request method.
  url: str Specifies the object being requested.
  [optional]
  skip_host: bool If True does not add automatically a 'Host:' header.
  skip_accept_encoding: bool If True does not add automatically an
                        'Accept-Encoding:' header.

</pre>
  <dl class="fields">
    <dt>Overrides:
        httplib.HTTPConnection.putrequest
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="putheader"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">putheader</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">header</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.putheader">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Send a request header line to the server.

For example: h.putheader('Accept', 'text/html')

Args:
  header: str Header to send.
  value: str Value for a given header to send.

</pre>
  <dl class="fields">
    <dt>Overrides:
        httplib.HTTPConnection.putheader
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="endheaders"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">endheaders</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.endheaders">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Indicate that the last header line has been sent to the server.</p>
  <dl class="fields">
    <dt>Overrides:
        httplib.HTTPConnection.endheaders
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="getresponse"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getresponse</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="adspygoogle.common.zsi.HttpsConnectionHandler-pysrc.html#HttpsConnectionHandler.getresponse">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get the response from the server.&quot;

Returns:
  instance Response from the server.

</pre>
  <dl class="fields">
    <dt>Overrides:
        httplib.HTTPConnection.getresponse
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="adspygoogle-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/google-api-dfp-python">DFP API Python Client Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
